/**
 * 
 */
package com.swim.settlementapply.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import java.util.Date;

/**
 * 结算申请Entity
 * @author 刘军武
 * @version 2021-03-03
 */
@Table(name="t_settlement_apply", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆信息id"),		
		@Column(name="channel", attrName="channel", label="渠道"),
		@Column(name="whatsoever", attrName="whatsoever", label="申请方"),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="contact", attrName="contact", label="联系方式"),
		@Column(name="settlement_overview", attrName="settlementOverview", label="结算概览"),
		@Column(name="settlement_amount", attrName="settlementAmount", label="结算金额"),
		@Column(name="address", attrName="address", label="场馆地址"),
		@Column(name="settlement_apply_state", attrName="settlementApplyState", label="申请状态 1表示结算中 2表示已结算"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class SettlementApply extends DataEntity<SettlementApply> {
	
	private static final long serialVersionUID = 1L;
	private String natatoriumInfoId;		// 游泳馆信息id
	private String channel;		// 渠道
	private String whatsoever;		// 申请方
	private String name;		// 姓名
	private String contact;		// 联系方式
	private String settlementOverview;		// 结算概览
	private Double settlementAmount;		// 结算金额
	private String address;		// 场馆地址
	private Long settlementApplyState;		// 申请状态 1表示结算中 2表示已结算
	
	
	//################### 利用jeesite4封装的查询  start ##########################
	
	public Date getCreateDate_gte() {
		return sqlMap.getWhere().getValue("create_date", QueryType.GTE);
	}

	public void setCreateDate_gte(Date createTime) {
		sqlMap.getWhere().and("create_date", QueryType.GTE, createTime);
	}
	
	public Date getCreateDate_lte() {
		return sqlMap.getWhere().getValue("create_date", QueryType.LTE);
	}

	public void setCreateDate_lte(Date createTime) {
		sqlMap.getWhere().and("create_date", QueryType.LTE, createTime);
	}
	
	//################### 利用jeesite4封装的查询  end ##########################
	
	@NotBlank(message="游泳馆信息id不能为空")
	@Length(min=0, max=64, message="游泳馆信息id长度不能超过 64 个字符")
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
	public SettlementApply() {
		this(null);
	}

	public SettlementApply(String id){
		super(id);
	}
	
	@NotBlank(message="渠道不能为空")
	@Length(min=0, max=10, message="渠道长度不能超过 10 个字符")
	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}
	
	@NotBlank(message="申请方不能为空")
	@Length(min=0, max=30, message="申请方长度不能超过 30 个字符")
	public String getWhatsoever() {
		return whatsoever;
	}

	public void setWhatsoever(String whatsoever) {
		this.whatsoever = whatsoever;
	}
	
	@NotBlank(message="姓名不能为空")
	@Length(min=0, max=30, message="姓名长度不能超过 30 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="联系方式不能为空")
	@Length(min=0, max=20, message="联系方式长度不能超过 20 个字符")
	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}
	
	@NotBlank(message="结算概览不能为空")
	@Length(min=0, max=200, message="结算概览长度不能超过 200 个字符")
	public String getSettlementOverview() {
		return settlementOverview;
	}

	public void setSettlementOverview(String settlementOverview) {
		this.settlementOverview = settlementOverview;
	}
	
	@NotNull(message="结算金额不能为空")
	public Double getSettlementAmount() {
		return settlementAmount;
	}

	public void setSettlementAmount(Double settlementAmount) {
		this.settlementAmount = settlementAmount;
	}
	
	@NotBlank(message="场馆地址不能为空")
	@Length(min=0, max=150, message="场馆地址长度不能超过 150 个字符")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@NotNull(message="申请状态 1表示结算中 2表示已结算不能为空")
	public Long getSettlementApplyState() {
		return settlementApplyState;
	}

	public void setSettlementApplyState(Long settlementApplyState) {
		this.settlementApplyState = settlementApplyState;
	}
	
}